package com.andatsoft.laisim.view;

import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.andatsoft.laisim.R;
import com.andatsoft.laisim.utils.Common;

public class TinyWidgetFragment extends BaseWidgetFragment {

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.widget_layout_tiny_preview,
				container, false);
		mViewBackground = view.findViewById(R.id.layout_widget_tiny_preview);
		// do a trick here
		SharedPreferences sp = getActivity().getSharedPreferences(
				Common.SP_WIDGET_SETTING_TINY_NAME, Context.MODE_PRIVATE);
		mViewBackground.setBackgroundColor(sp.getInt(
				Common.SP_WIDGET_SETTING_TINY_BG, 0x00ffffff));
		return view;
	}
}
